export default {
  
  getDate(time){
    // 获取日期
    
    let mydate=new Date(time)
    
    let y =  mydate.getFullYear()
    
    let m = mydate.getMonth()+1
    
    let d = mydate.getDate()
    
    return y+'-'+m+'-'+d
  },
  getDateTime(time){
    // 获取日期时间
    
    let mydate=new Date(time)
    
    let y =  mydate.getFullYear()
    
    let m = mydate.getMonth()+1
    
    let d = mydate.getDate()
    
    let h = mydate.getHours()
    
    let i = mydate.getMinutes()
    
    let s = mydate.getSeconds()
    
    return y+'-'+m+'-'+d+' '+h+':'+i+':'+s
  }
  
}